#include("../../comm/FormHead.html")
<div id="main">
    <form action="" class="layui-form margin-10" lay-filter="form">
        <input type="hidden" id="actions" name="actions" value="#(form.actions)">
        #(token??)

        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">键值</label>

                    <div class="layui-input-block">
                        <input type="text" id="data_key" name="data_key" placeholder="请输入键值" #(form.actions=='EDIT'?'readonly':'')
                               value="#(data.data_key)" class="layui-input #(form.actions=='EDIT'?'input-readonly':'')">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">标题</label>

                    <div class="layui-input-block">
                        <input type="text" id="data_title" name="data_title" placeholder="请输入标题"
                               value="#(data.data_title)" class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">名称</label>

                    <div class="layui-input-inline" style="width:150px">
                        <input type="text" id="data_name" name="data_name" placeholder="name"
                               value="#(data.data_name)" class="layui-input">
                    </div>
                    <label class="layui-form-mid left5">事件</label>

                    <div class="layui-input-inline" style="width:150px">
                        <input type="text" name="data_filter" placeholder="filter"
                               value="#(data.data_filter)" class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">数据源</label>

                    <div class="layui-input-block">
                        <input type="text" id="data_source" name="data_source" placeholder="请输入数据源"
                               value="#(data.data_source)" class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">颜色</label>

                    <div class="layui-input-block">
                        <input type="text" id="data_color" name="data_color" placeholder="请输入颜色"
                               value="#(data.data_color)" class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">显示顺序</label>

                    <div class="layui-input-block">
                        <input type="text" id="sindex"  name="sindex" placeholder="请输入显示顺序"
                               value="#(data.sindex)" class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">备注说明</label>

                    <div class="layui-input-block">
                        <textarea name="data_desc" placeholder="请输入备注信息" class="layui-textarea" style="height:80px">#(data.data_desc)</textarea>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="submit" class="layui-btn" lay-submit="" lay-filter="Submit1">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>
<SCRIPT LANGUAGE="JavaScript">
    <!--
    layui.use(['form', 'myTool'], function () {
        layui.form.on('submit(Submit1)', function (data) {
            layui.myTool.postJson("ModifySysDataApi", data.field, function () {
                parent.layer.closeAll();
            });
            return false;
        });
    });
    //-->
</SCRIPT>
</body>
</html>